import Vue from 'vue';
import Vuex from 'vuex';
import user from './modules/user';
import screen from './modules/screen';
import router from './modules/router';
import * as actions from './actions';
import * as getters from './getters';
import createPersistedState from 'vuex-persistedstate'

Vue.use (Vuex);

export default new Vuex.Store ({
  modules: {
    user,
    screen,
    router
  },
  actions,
  getters,
  plugins: [
    createPersistedState({
      storage: window.localStorage
    })
  ]
});
